1. Field of the Invention
The present invention relates to a storage apparatus allowing external accesses to be made and a storage system employing the storage apparatus.
2. Description of the Related Art
A typical example of the storage apparatus is a flash memory.
In a computer system functioning as the storage system, a host apparatus also employed in the computer system writes data into the flash memory in order to save the data in the flash memory which serves as a storage section (refer to Japanese Patent Laid-open No. 2007-058840).
The flash memory includes cache blocks each used for storing data. If the cache blocks become insufficient, it is necessary to carry out a garbage collection operation on the flash memory in order to assure usable cache blocks.
In the garbage collection operation, valid data stored in a plurality of logical blocks including cache blocks used for storing the data is transferred to a single logical block and, then, the cache blocks included in the logical blocks are initialized.
Thus, the cache blocks already subjected to the garbage collection operation can each be released as a cache block which can be used for storing new data.